<!--
 * @Author: 持禅 1791106511@qq.com
 * @Date: 2023-11-01 15:44:48
 * @LastEditors: 持禅 1791106511@qq.com
 * @LastEditTime: 2023-11-02 13:33:16
 * @FilePath: \yuce.top\app\admin\view\basic\usercon.html
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
{include file="base/header"}
      <style>
    
     
        .userp_1{
            position: relative;
        }
        .userp_2{
            position:absolute;
            right:20px;
            top:8px;
            font-weight: bold;
        }
      </style>
        <div class="layui-card"></div>
        <div class="layui-card layui-col-md6">
            <div class="layui-card">
                <div class="layui-card-header">{$msg.remark}</div>
            </div>
          
            <div class="layui-card-body">
                <form id="formId">
                        <textarea name="content" id="edit" cols="30" rows="100">{$msg.content}</textarea>
                        <div class="layui-form-item">
                            <div class="layui-input-block" style="margin-top:20px;">
                              <button class="pear-btn pear-btn-primary pear-btn-sm" lay-submit lay-filter="form-save"><i class="layui-icon layui-icon-ok"></i>确认信息</button>
                              <button type="reset" class="pear-btn  pear-btn-sm"><i class="layui-icon layui-icon-refresh"></i>重置</button>
                            </div>
                          </div>
                  </form>
            </div>
        </div>
           
        <script>
           	layui.use(['tinymce', 'util', 'layer','code','element','table', 'form', 'jquery'], function() {
				var tinymce = layui.tinymce;
				var util = layui.util;
				var table = layui.table;
				var form = layui.form;
				var $ = layui.jquery;
				layui.code();

				var edit = tinymce.render({
					elem: "#edit",
					height: 600,
                    images_upload_url:"{:url('basic/uploadFile')}"
				});
                form.on('submit(form-save)', function (data) {
                    var data = $("#formId");
                    $("#edit").val(edit.getContent());
              
                    postDatai("{:url('basic/setUsercont')}?type={$Request.get.type}", data).then(function (res) {
                        if (res.code == 200) {
                            layer.msg(res.message, {
                                icon: 1,
                                time: 1000
                            }, function () {
                              layui.admin.refreshThis()
                               return; 
                            });
                        } else {
                            layer.msg(res.message, {
                                icon: 2,
                                time: 1000
                            });
                        }
                    });
                    return false;
                });
			
			});

        </script>
{include file="base/footer"}